package com.mo.design.pattern.creational.factory;

public class CarFactory extends VehicleFactory02 {
    @Override
    protected Vehicle02 createVehicle(String item) {
        if (item.equals("small")) {
            return new SportCar();
        } else if (item.equals("large")) {
            return new SedanCar();
        }
        return null;
    }
}
